
package com.idealighter.game.games.foursshop.handler;

import com.idealighter.game.core.annotation.ResMsgHandler;
import com.idealighter.game.games.foursshop.FoursShopPlayer;
import com.idealighter.game.games.foursshop.message.ResBalanceMsg;
import com.idealighter.game.message.core.ResMessage;
import com.idealighter.game.robot.core.Player;
import com.idealighter.game.robot.handler.ResMessageHandler;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


@ResMsgHandler(504218)
public class ResBalanceHandler implements ResMessageHandler {
  private static final Logger LOG = LoggerFactory.getLogger(ResBalanceHandler.class);

  @Override
  public void action(Player player, ResMessage message) {
    ResBalanceMsg msg = (ResBalanceMsg) message;
    FoursShopPlayer foursShopPlayer = (FoursShopPlayer) player;
    foursShopPlayer.bankerTotalChips = msg.getBankerTotalChips();
    LOG.info("[4s]玩家[{}][{}]赢得了筹码[{}]", player.playerId, player.userName, msg.getBillChips());

  }

}
